<!DOCTYPE html>
<html>
<head>
    <meta charset="UTF-8">
    <title>后台管理</title>
    <link rel="stylesheet" type="text/css" href="/resources/easyui/themes/default/easyui.css">
    <link rel="stylesheet" type="text/css" href="/resources/easyui/themes/icon.css">
    <script type="text/javascript" src="/resources/easyui/jquery.min.js"></script>
    <script type="text/javascript" src="/resources/easyui/jquery.easyui.min.js"></script>
</head>

<body>
<div class="easyui-panel" title="详细信息" style="width:100%;width:400px;padding:30px 60px;">
    <div style="margin-bottom:20px">
        <span style="margin-right: 20px;">推广位：</span>
        <textarea id="tgid" data-options="required:true" name="tgid" style="width: 200px;height: 200px;">${obj.tgid!''}</textarea>
    </div>
    <div style="margin-bottom:20px">
        <span style="margin-right: 20px;">群名称：</span>
        <textarea id="groupname" name="groupname" style="width: 200px;height: 200px;">${obj.groupname!''}</textarea>
    </div>
    <div style="margin-bottom:20px">
        <input class="easyui-textbox" id="nickname" name="nickname" style="width:100%"
               data-options="label:'昵称:',required:true" value="${obj.nickname!''}"/>
    </div>
    <div style="margin-bottom:20px">
        <input class="easyui-textbox" id="phone" name="phone" style="width:100%"
               data-options="label:'电话:',required:true"
               value="${obj.phone!''}"/>
    </div>
    <div style="margin-bottom:20px">
        <input class="easyui-textbox" id="referrer_id" name="referrer_id" style="width:100%"
               data-options="label:'推荐人ID:',required:false"
               value="${obj.referrer_id!''}"/>
    </div>
    <div style="margin-bottom:20px">
        <input class="easyui-textbox" id="level" name="level" style="width:100%"
               data-options="label:'代理级别:',required:true"
               value="${obj.level!''}"/>
    </div>
    <div style="margin-bottom:20px">
        <input class="easyui-textbox" id="openid" name="openid" readonly style="width:100%"
               data-options="label:'OPENID:',required:true"
               value="${obj.openid!''}"/>
        <a href="/moneys?openid=${obj.openid!''}" target="_blank">查看订单</a>
    </div>
    <div style="text-align:center;padding:5px 0">
        <a href="javascript:void(0)" class="easyui-linkbutton" onclick="submitForm()" style="width:80px">提交</a>
    </div>
</div>
<script>
    function submitForm() {
        $.post("/update", {
            id:${obj.id!''},
            tgid: $("#tgid").val(),
            nickname: $("#nickname").val(),
            phone: $("#phone").val(),
            groupname: $("#groupname").val(),
            referrer_id: $("#referrer_id").val(),
            level: $("#level").val()
        }, function () {
            alert("修改成功");
        });
    }
</script>
</body>
</html>